package com.name.givename.dao;

/**
 * @author 冉野 E-mail:yangtianrui135@163.com
 * @version 创建时间：18/9/14 上午10:47
 */
public class JavaVMStackOOM {
    private void dontStop ()
    {
        while (true){

        }
    }


    public void statocLeakByLeak () {
        while (true) {
            Thread thread = new Thread(new Runnable() {
                @Override
                public void run() {
                   dontStop();
                }
            });
            thread.start();
        }
    }

    public static void main(String[] args) {
        JavaVMStackOOM javaVMStackOOM = new JavaVMStackOOM();
        javaVMStackOOM.statocLeakByLeak();
    }
}
